package com.hrm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hrm.entity.Room;
import com.hrm.vo.RoomVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface RoomMapper extends BaseMapper<Room> {

    @Select("select atr.* from att_room atr where atr.is_deleted = 0")
    IPage<RoomVO> listAttTrainVO(IPage<RoomVO> config);

    @Select("select aa.*,ss.name,ss.code,ss.phone from att_approve aa " +
            "inner join sys_staff ss on aa.staff_id = ss.id " +
            "where aa.is_deleted = 0 and aa.staff_id = #{id}")
    IPage<RoomVO> listAttTrainVOByStaffId(IPage<RoomVO> config, @Param("id") Integer id);
}
